package com.test.cordova.mvp.model;

import com.test.cordova.mvp.base.BaseModel;
import com.test.cordova.mvp.observable.MainServices;
import com.test.cordova.mvp.contract.MainContract;

import io.reactivex.Observable;

/**
 * Created by Administrator on 2019/2/22 0022.
 */

public class MainModelImpl extends BaseModel<MainServices> implements MainContract.MainModel {

    private MainServices request;

    @Override
    public void initRequest() {
        request = createRequest();
    }

    @Override
    public Observable<String> getDataFromNet() {
        return request.getTest();
    }

    @Override
    public void onDestory() {
        request = null;
    }
}
